package com.example.webrtcproject;

import com.google.gson.Gson;

import org.webrtc.SessionDescription;

import java.util.List;

import androidx.annotation.NonNull;

/**
 * @作者 mazhuang
 * @创建时间 2019/12/31 15:17
 * @文件描述:
 */
public class Model {
    private String cmd;
    private String roomid;
    private String clientid;
    private String eventname;
    private String Data;
    private String msg;
//    private List<WebMessage> msg;
//    private WebMessage msg;
    //{"eventname":"_peer","Data":"registered"}
    public Model(String cmd, String roomid, String clientid) {
        this.cmd = cmd;
        this.roomid = roomid;
        this.clientid = clientid;
    }

    public String getCmd() {
        return cmd;
    }

    public void setCmd(String cmd) {
        this.cmd = cmd;
    }

    public String getRoomid() {
        return roomid;
    }

    public void setRoomid(String roomid) {
        this.roomid = roomid;
    }

    public String getClientid() {
        return clientid;
    }

    public void setClientid(String clientid) {
        this.clientid = clientid;
    }

    public String getEventname() {
        return eventname;
    }

    public void setEventname(String eventname) {
        this.eventname = eventname;
    }

    public String getData() {
        return Data;
    }

    public void setData(String data) {
        Data = data;
    }

//    public WebMessage getMsg() {
//        return msg;
//    }
//
//    public void setMsg(WebMessage msg) {
//        this.msg = msg;
//    }

//    public List<WebMessage> getMsg() {
//        return msg;
//    }
//
//    public void setMsg(List<WebMessage> msg) {
//        this.msg = msg;
//    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @NonNull
    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

}
